@(id: Long, computerForm: Form[Computer], companies : Seq[(String, String)])

@import helper._

@implicitFieldConstructor = @{ FieldConstructor(company.twitterBootstrapInput.f) }

@main("Company create") {

    <h1>Edit computer</h1>

    @form(routes.CompanyController.update(id)) {

        <fieldset>

            @inputText(computerForm("name"), '_label -> "Computer name")
            @inputText(computerForm("introduced"), '_label -> "Introduced date")
            @inputText(computerForm("discontinued"), '_label -> "Discontinued date")

            @select(
                computerForm("company"),
                companies,
                '_label -> "Company", '_default -> "-- Choose a company --",
                '_showConstraints -> false
            )

        </fieldset>

        <div class="actions">
            <input type="submit" value="Save this computer" class="btn primary"> or
            <a href="@routes.CompanyController.list()" class="btn">Cancel</a>
        </div>

    }

    @form(routes.CompanyController.delete(id), 'class -> "topRight") {
        <input type="submit" value="Delete this computer" class="btn danger">
    }

}